﻿using BCEntity.TMS.Agent.AgentBranchesConfig;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCData.TMS.Agent.AgentBranchesConfig
{
    /// <summary>
    /// 代理商网点配置
    /// </summary>
    public interface IAgentBranchesConfigData
    {
        /// <summary>
        /// 添加代理商网点配置
        /// </summary>
        /// <param name="entity">代理商网点配置信息</param>
        /// <returns></returns>
        Task<AgentBranchesConfigEntity> Insert(AgentBranchesConfigEntity entity);

        /// <summary>
        /// 获取代理商网点配置记录
        /// </summary>
        /// <param name="agentBranchesConfigId">代理商网点配置Id</param>
        /// <returns></returns>
        Task<AgentBranchesConfigEntity> GetById(long agentBranchesConfigId);

        /// <summary>
        /// 更新代理商网点配置
        /// </summary>
        /// <param name="entity">代理商网点配置信息</param>
        /// <returns></returns>
        Task<AgentBranchesConfigEntity> Update(AgentBranchesConfigEntity entity);

        /// <summary>
        /// 删除代理商网点配置记录
        /// </summary>
        /// <param name="agentBranchesConfigId">代理商网点配置Id</param>
        /// <returns></returns>
        Task<int> Delete(long agentBranchesConfigId);

        /// <summary>
        /// 查询代理商网点配置
        /// </summary>
        /// <param name="agentRecordId">代理商ID</param>
        /// <param name="agentBranchesName">代理商网点名称</param>
        /// <param name="contactPhone">联系人电话</param>
        /// <param name="provinceCode">省份编码</param>
        /// <param name="cityCode">城市编码</param>
        /// <param name="countyCode">区县编码</param>
        /// <param name="address">地址信息</param>
        /// <param name="pageIndex">页号</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        Task<(IEnumerable<AgentBranchesConfigEntity>, int)> Query(long? agentRecordId, string agentBranchesName, string contactPhone, string provinceCode, string cityCode, string countyCode, string address, int pageIndex, int pageSize);

        /// <summary>
        /// 获取代理商网点配置
        /// </summary>
        /// <param name="agentRecordId">代理商ID</param>
        /// <param name="countCode">区县编码</param>
        /// <param name="address">地址信息</param>
        /// <returns></returns>
        Task<IEnumerable<AgentBranchesConfigEntity>> GetList(long? agentRecordId, string countCode, string address);
    }
}
